package sesi.ejava.stream;

import sesi.ejava.bcam.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

/**
 * This class provides the main activity of the becam application. This activity
 * is composed by severals buttons that take the user to the different functions
 * of the application.
 * 
 * @author Cesar Fuguet
 * 
 */
public class ServerActivity extends Activity {

	private ImageView imgInitServer;
	private ImageView imgTgtServer;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.server_menu_activity);

		imgInitServer = (ImageView) findViewById(R.id.imgInitServer);
		imgInitServer.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent initActivityIntent = new Intent(v.getContext(),
						ServerSenderActivity.class);

				startActivity(initActivityIntent);
			}
		});

		imgTgtServer = (ImageView) findViewById(R.id.imgTgtServer);
		imgTgtServer.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				Intent tgtActivityIntent = new Intent(v.getContext(),
						ServerReceiverActivity.class);
				startActivity(tgtActivityIntent);
			}
		});
	}
}